(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)
data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)
data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)
data=attr;}
if(data.indexOf('{')<0)
data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);;;(function($){$.fn.navmenu=function(options){options=$.extend({},$.fn.navmenu.defaults,options||{});return this.each(function(){var navTimeout,homePage,cachedDivs={},currentHoverPage;var $navMenu=$(this);var $parent=$navMenu.parent();if($parent.hasClass('right')||$parent.hasClass('center'))
$parent.height($navMenu.height());for(i in options.pageInfo){var page=options.pageInfo[i];if(page.P==0){homePage=page;break;}}
var activePages={};var currentPage=options.pageInfo["a"+pageCode],parentPage;if(currentPage){activePages[currentPage.C]=1;while(1){parentPage=getParentPage(currentPage);if(!parentPage)
break;if(homePage&&parentPage.C==homePage.C)
break;currentPage=parentPage;activePages[currentPage.C]=1;}}
function getDivs(pageCode){if(cachedDivs[pageCode])
return cachedDivs[pageCode];var $divs=$();for(i in options.pageInfo){var page=options.pageInfo[i];if(page.P!=pageCode)
continue;if(page.C in activePages)
var linkClass="activeLink";else
var linkClass="";linkClass+=" nav {pageCode:"+page.C+",parentId:"+page.P+"}";var target="";if(page.R){var url=page.R;target=page.RT;}else if(page.U){var url=page.U;}else{var url="javascript:void(0)";}
$divs=$divs.add($("<div>",{"class":"linkDiv"}).append($("<a>",{href:url,"class":linkClass,html:page.N,target:target})));}
cachedDivs[pageCode]=$divs;return $divs;}
function getParentPage(childPage){for(i in options.pageInfo){var page=options.pageInfo[i];if(childPage.P==page.C)
return page;}}
$("a",$navMenu).each(function(){var data=$(this).metadata();if(data.pageCode in activePages)
$(this).addClass("activeLink");});$("a.topLevel",$navMenu).mouseover(function(){clearTimeout(navTimeout);var data=$(this).metadata();if(currentHoverPage==data.pageCode)
return;currentHoverPage=data.pageCode;if(options.animate)
$('div.subLevel').slideUp('fast',function(){$(this).remove();});else
$('div.subLevel').remove();if(homePage&&data.pageCode==homePage.C)
return;var $divs=getDivs(data.pageCode);if($divs.length==0)return;var offset=$(this).offset();var parentWidth=$(this).parent().width();if(options.alignment=="Vertical"){var top=offset.top;var left=offset.left+parentWidth;}else{var top=offset.top+$(this).parent().height()
var left=offset.left;}
if(options.animate)
var display="none";else
var display="block";var $div=$("<div>",{"class":"subLevel",css:{top:top,left:left,minWidth:parentWidth,display:display,zIndex:100}}).append($divs).appendTo('body');if(options.animate)
$div.slideDown("fast");}).each(function(){var data=$(this).metadata();var page=options.pageInfo["a"+data.pageCode];if(page&&page.R){$(this).attr("href",page.R).attr("target",page.RT);}});$('div.linkDiv a').live('mouseover',function(){clearTimeout(navTimeout);var offset=$(this).offset();var data=$(this).metadata();$("div.child-of-"+data.parentId).remove();var $divs=getDivs(data.pageCode);if($divs.length==0)return;var top=offset.top;var left=offset.left+$(this).parent().width();$("<div>",{"class":"subLevel child child-of-"+data.parentId,css:{top:top,left:left}}).append($divs).appendTo('body');});$('a.topLevel,a.nav').live('mouseout',function(){navTimeout=setTimeout(function(){currentHoverPage=0;if(options.animate){$('div.subLevel').slideUp('fast',function(){$(this).remove();});}else{$('div.subLevel').remove();}},1000);});(function(){var $crumbs=$("#breadCrumbs");if($crumbs.length==0||$crumbs.data("initialized")==true)
return;$crumbs.data("initialized",true);if(pageCode==homePage.C){return;}
var i=0;var html="";var currentPage=options.pageInfo["a"+pageCode];if(!currentPage){return;}
while(1){var parentPage=getParentPage(currentPage);if(!parentPage)break;i++;if(currentPage.C==pageCode)
var linkClass="activeCrumb";else
var linkClass="";html='<a href="'+currentPage.U+'" target="'+currentPage.T+'" class="'+linkClass+'">'
+currentPage.N+'</a> &gt; '+html;currentPage=parentPage;}
if(i<3){return;}
html=html.substring(0,html.length-6);html='<a href="'+homePage.U+'">'+homePage.N+'</a> &gt; '+html;$crumbs.html(html).show();})();(function(){if(homePage&&pageCode==homePage.C)
return;var $clickUnder=$("#clickUnder");if($clickUnder.length==0||$clickUnder.data("initialized")==true)
return;$clickUnder.data("initialized",true);var currentPage=options.pageInfo["a"+pageCode];var topLevelPage;if(!currentPage)return;while(1){var parentPage=getParentPage(currentPage);if(homePage&&parentPage.C==homePage.C){break;}
if(homePage&&parentPage.P==homePage.C){topLevelPage=parentPage;break;}
currentPage=parentPage;}
if(!topLevelPage)topLevelPage=currentPage;var $divs=$();for(i in options.pageInfo){var page=options.pageInfo[i];if(topLevelPage.C!=page.P)
continue;if(options.alignment!="Vertical"&&page.N.substring(0,1)==" "){page.N=page.N.split(" ").join("&nbsp;");}
if(page.C in activePages)
var linkClass="activeLink";else
var linkClass="";linkClass+=" clickLink nav {pageCode:"+page.C+",parentId:"+page.P+"}";$divs=$divs.add($("<div>",{"class":"clickLinkDiv linkDiv",mouseover:function(){if(options.animate)
$('div.subLevel').slideUp('fast',function(){$(this).remove();});else
$('div.subLevel').remove();},mouseout:function(){currentHoverPage=0;}}).append($("<a>",{href:page.U,target:page.T,"class":linkClass,html:page.N})));}
if(options.alignment=="Vertical")
$clickUnder.remove().appendTo($("a.activeLink").parent()).append($divs);else
$clickUnder.append($divs);})();(function(){$footer=$("#superFooter");if($footer.length==0||!homePage)return;var $ul=$("ul","#superFooterParent"),maxHeight=0;$ul.each(function(){var $this=$(this);var data=$this.metadata();for(var i in options.pageInfo){var page=options.pageInfo[i];if(page.P!=data.pageCode)continue;var $newLi=$("li:first",$this).clone();$("a",$newLi).html(page.N).attr("href",page.U);$newLi.appendTo($this);}});$("li.parent","#superFooterParent").each(function(){var height=$(this).height();if(height>maxHeight)maxHeight=height;}).each(function(){$(this).height(maxHeight+"px");});})();});}
$.fn.navmenu.defaults={pageInfo:[],alignment:"Vertical",animate:false};})(jQuery);;$(function() {for (var i in tasks) {window.setTimeout(tasks[i], 0);}});function initMenu(){};$(function(){$("#navMenu").navmenu({pageInfo:{"a3082":{"P":0,"ID":613727,"C":3082,"O":0,"U":"http:\/\/www.stilrugby.com\/","N":"STIL Home","T":"_top","R":"","RT":"_blank"},"a3083":{"P":3082,"ID":600202,"C":3083,"O":"1","U":"http:\/\/www.stilrugby.com\/irb-sevens.html","N":"IRB Sevens","T":"_top","R":"","RT":"_blank"},"a3084":{"P":3082,"ID":600203,"C":3084,"O":"2","U":"http:\/\/www.stilrugby.com\/super-15.html","N":"Super 15","T":"_top","R":"","RT":"_blank"},"a3276":{"P":3084,"ID":603128,"C":3276,"O":"1","U":"http:\/\/www.stilrugby.com\/travel.html","N":"Travel","T":"_top","R":"","RT":"_blank"},"a3275":{"P":3084,"ID":3275,"C":3275,"O":"2","U":"http:\/\/www.allblacks.com\/super14\/","N":"Fixtures","T":"_blank","R":"http:\/\/www.allblacks.com\/super14\/","RT":"_blank"},"a3085":{"P":3082,"ID":600274,"C":3085,"O":"3","U":"http:\/\/www.stilrugby.com\/all-blacks.html","N":"All Blacks","T":"_top","R":"","RT":"_blank"},"a3159":{"P":3085,"ID":600234,"C":3159,"O":"1","U":"http:\/\/www.stilrugby.com\/all-blacks-nzgames.html","N":"NZ Games","T":"_top","R":"","RT":"_top"},"a3281":{"P":3085,"ID":3281,"C":3281,"O":"2","U":"","N":"Overseas Games","T":"","R":"http:\/\/www.stilrugby.com\/overseas_bledisloecup.html","RT":"_blank"},"a3313":{"P":3281,"ID":600204,"C":3313,"O":"1","U":"http:\/\/www.stilrugby.com\/end-of-year-tour.html","N":"End of Year Tour","T":"_top","R":"","RT":"_top"},"a3314":{"P":3281,"ID":600266,"C":3314,"O":"2","U":"http:\/\/www.stilrugby.com\/bledisloe-cup.html","N":"Bledisloe Cup","T":"_top","R":"","RT":"_blank"},"a3319":{"P":3281,"ID":600267,"C":3319,"O":"3","U":"http:\/\/www.stilrugby.com\/tri-nations.html","N":"Tri-Nations","T":"_top","R":"","RT":"_blank"},"a3086":{"P":3082,"ID":600174,"C":3086,"O":"4","U":"http:\/\/www.stilrugby.com\/air-new-zealand.html","N":"ITM Cup","T":"_top","R":"","RT":"_blank"},"a3330":{"P":3086,"ID":3330,"C":3330,"O":"1","U":"http:\/\/www.itmcup.co.nz\/index.cfm?layout=itmCupFixtures","N":"Fixtures","T":"_blank","R":"http:\/\/www.itmcup.co.nz\/index.cfm?layout=itmCupFixtures","RT":"_blank"},"a3331":{"P":3086,"ID":457130,"C":3331,"O":"2","U":"http:\/\/www.stilrugby.com\/airnzcup-travel.html","N":"Travel","T":"_top","R":"","RT":"_blank"},"a3368":{"P":3082,"ID":3368,"C":3368,"O":"8","U":"http:\/\/www.allblacks.com","N":"All Blacks Website","T":"_top","R":"http:\/\/www.allblacks.com","RT":"_top"},"a3089":{"P":3082,"ID":180696,"C":3089,"O":"9","U":"http:\/\/www.stilrugby.com\/contact-stil.html","N":"Contact Us","T":"_top","R":"","RT":"_blank"}},alignment:"Horizontal",animate:0})});